package com.wenjunwu.blog.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.wenjunwu.blog.common.BaseDao;
import com.wenjunwu.blog.dao.SystemResourceDao;
import com.wenjunwu.blog.entity.SystemResource;

@Repository
public class SystemResourceDaoImpl extends BaseDao<SystemResource> implements SystemResourceDao {
	
	@Override
	public SystemResource findSystemResource(Long id) {
		return sqlSession.selectOne(DEFAULTNAMESPACE.concat("findSystemResourceById"), id);
	}

	@Override
	public List<SystemResource> findResourceByRoleId(Long roleId) {
		return sqlSession.selectList(DEFAULTNAMESPACE.concat("findResourceByRoleId"),roleId);
	}
}
